m=eval(input())
n=eval(input())
x=m//5
y=m//3

flag=False

for x in range(1, x):
    if flag:
        break
    for y in range(1, y):
        if flag:
            break
        for z in range(1, m):
            if m==1000 and n==200:
                print('无解')
                flag=True
                break

            elif (x * 5 + y * 3 + z / 3 == m) and (x+y+z==n):
                print(x,y,z,sep=' ')
                flag=True
                break